3.376 \(\int \frac{\log (c (d+e x^n)^p)}{x (f+g x^{-n})^2} \, dx\)

Optimal. Leaf size=156 \[ \frac{p \text{PolyLog}\left (2,\frac{f \left (d+e x^n\right )}{d f-e g}\right )}{f^2 n}+\frac{g \log \left (c \left (d+e x^n\right )^p\right )}{f^2 n \left (f x^n+g\right )}+\frac{\log \left (c \left (d+e x^n\right )^p\right ) \log \left (-\frac{e \left (f x^n+g\right )}{d f-e g}\right )}{f^2 n}+\frac{e g p \log \left (d+e x^n\right )}{f^2 n (d f-e g)}-\frac{e g p \log \left (f x^n+g\right )}{f^2 n (d f-e g)} \]

[Out]

(e*g*p*Log[d + e*x^n])/(f^2*(d*f - e*g)*n) + (g*Log[c*(d + e*x^n)^p])/(f^2*n*(g + f*x^n)) - (e*g*p*Log[g + f*x
^n])/(f^2*(d*f - e*g)*n) + (Log[c*(d + e*x^n)^p]*Log[-((e*(g + f*x^n))/(d*f - e*g))])/(f^2*n) + (p*PolyLog[2,
(f*(d + e*x^n))/(d*f - e*g)])/(f^2*n)

________________________________________________________________________________________

Rubi [A]  time = 0.277577, antiderivative size = 156, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 10, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.37, Rules used = {2475, 263, 43, 2416, 2395, 36, 31, 2394, 2393, 2391} \[ \frac{p \text{PolyLog}\left (2,\frac{f \left (d+e x^n\right )}{d f-e g}\right )}{f^2 n}+\frac{g \log \left (c \left (d+e x^n\right )^p\right )}{f^2 n \left (f x^n+g\right )}+\frac{\log \left (c \left (d+e x^n\right )^p\right ) \log \left (-\frac{e \left (f x^n+g\right )}{d f-e g}\right )}{f^2 n}+\frac{e g p \log \left (d+e x^n\right )}{f^2 n (d f-e g)}-\frac{e g p \log \left (f x^n+g\right )}{f^2 n (d f-e g)} \]

Antiderivative was successfully verified.

[In]

Int[Log[c*(d + e*x^n)^p]/(x*(f + g/x^n)^2),x]

[Out]

(e*g*p*Log[d + e*x^n])/(f^2*(d*f - e*g)*n) + (g*Log[c*(d + e*x^n)^p])/(f^2*n*(g + f*x^n)) - (e*g*p*Log[g + f*x
^n])/(f^2*(d*f - e*g)*n) + (Log[c*(d + e*x^n)^p]*Log[-((e*(g + f*x^n))/(d*f - e*g))])/(f^2*n) + (p*PolyLog[2,
(f*(d + e*x^n))/(d*f - e*g)])/(f^2*n)

Rule 2475

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.)*((f_) + (g_.)*(x_)^(s_))^(r_.),
 x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(f + g*x^(s/n))^r*(a + b*Log[c*(d + e*x)^p])^q,
x], x, x^n], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, q, r, s}, x] && IntegerQ[r] && IntegerQ[s/n] && Intege
rQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0])

Rule 263

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(m + n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b, m
, n}, x] && IntegerQ[p] && NegQ[n]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2416

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((h_.)*(x_))^(m_.)*((f_) + (g_.)*(x_)^(r_.))^(q
_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*Log[c*(d + e*x)^n])^p, (h*x)^m*(f + g*x^r)^q, x], x] /; FreeQ[{a,
 b, c, d, e, f, g, h, m, n, p, q, r}, x] && IntegerQ[m] && IntegerQ[q]

Rule 2395

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((f + g
*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n]))/(g*(q + 1)), x] - Dist[(b*e*n)/(g*(q + 1)), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 2394

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[(Log[(e*(f +
g*x))/(e*f - d*g)]*(a + b*Log[c*(d + e*x)^n]))/g, x] - Dist[(b*e*n)/g, Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]

Rule 2393

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Dist[1/g, Subst[Int[(a +
 b*Log[1 + (c*e*x)/g])/x, x], x, f + g*x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && EqQ[g
 + c*(e*f - d*g), 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int \frac{\log \left (c \left (d+e x^n\right )^p\right )}{x \left (f+g x^{-n}\right )^2} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\log \left (c (d+e x)^p\right )}{\left (f+\frac{g}{x}\right )^2 x} \, dx,x,x^n\right )}{n}\\ &=\frac{\operatorname{Subst}\left (\int \left (-\frac{g \log \left (c (d+e x)^p\right )}{f (g+f x)^2}+\frac{\log \left (c (d+e x)^p\right )}{f (g+f x)}\right ) \, dx,x,x^n\right )}{n}\\ &=\frac{\operatorname{Subst}\left (\int \frac{\log \left (c (d+e x)^p\right )}{g+f x} \, dx,x,x^n\right )}{f n}-\frac{g \operatorname{Subst}\left (\int \frac{\log \left (c (d+e x)^p\right )}{(g+f x)^2} \, dx,x,x^n\right )}{f n}\\ &=\frac{g \log \left (c \left (d+e x^n\right )^p\right )}{f^2 n \left (g+f x^n\right )}+\frac{\log \left (c \left (d+e x^n\right )^p\right ) \log \left (-\frac{e \left (g+f x^n\right )}{d f-e g}\right )}{f^2 n}-\frac{(e p) \operatorname{Subst}\left (\int \frac{\log \left (\frac{e (g+f x)}{-d f+e g}\right )}{d+e x} \, dx,x,x^n\right )}{f^2 n}-\frac{(e g p) \operatorname{Subst}\left (\int \frac{1}{(d+e x) (g+f x)} \, dx,x,x^n\right )}{f^2 n}\\ &=\frac{g \log \left (c \left (d+e x^n\right )^p\right )}{f^2 n \left (g+f x^n\right )}+\frac{\log \left (c \left (d+e x^n\right )^p\right ) \log \left (-\frac{e \left (g+f x^n\right )}{d f-e g}\right )}{f^2 n}-\frac{p \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{f x}{-d f+e g}\right )}{x} \, dx,x,d+e x^n\right )}{f^2 n}+\frac{\left (e^2 g p\right ) \operatorname{Subst}\left (\int \frac{1}{d+e x} \, dx,x,x^n\right )}{f^2 (d f-e g) n}-\frac{(e g p) \operatorname{Subst}\left (\int \frac{1}{g+f x} \, dx,x,x^n\right )}{f (d f-e g) n}\\ &=\frac{e g p \log \left (d+e x^n\right )}{f^2 (d f-e g) n}+\frac{g \log \left (c \left (d+e x^n\right )^p\right )}{f^2 n \left (g+f x^n\right )}-\frac{e g p \log \left (g+f x^n\right )}{f^2 (d f-e g) n}+\frac{\log \left (c \left (d+e x^n\right )^p\right ) \log \left (-\frac{e \left (g+f x^n\right )}{d f-e g}\right )}{f^2 n}+\frac{p \text{Li}_2\left (\frac{f \left (d+e x^n\right )}{d f-e g}\right )}{f^2 n}\\ \end{align*}

Mathematica [B]  time = 1.49929, size = 433, normalized size = 2.78 \[ \frac{p \left (f x^n+g\right ) \text{PolyLog}\left (2,-\frac{f x^n}{g}\right )+g \log \left (f-f x^{-n}\right ) \log \left (c \left (d+e x^n\right )^p\right )-f x^n \log \left (c \left (d+e x^n\right )^p\right )+f x^n \log \left (f-f x^{-n}\right ) \log \left (c \left (d+e x^n\right )^p\right )-p \log \left (d x^{-n}+e\right ) \left (\left (f x^n+g\right ) \log \left (f-f x^{-n}\right )-f x^n\right )+f n p x^n \log (x) \log \left (\frac{f x^n}{g}+1\right )+g p \log \left (f-f x^{-n}\right )-g n p \log (x) \log \left (f-f x^{-n}\right )+g n p \log (x) \log \left (\frac{f x^n}{g}+1\right )+f p x^n \log \left (f-f x^{-n}\right )-f n p x^n \log (x) \log \left (f-f x^{-n}\right )}{f^2 n \left (f x^n+g\right )}-\frac{p \left (-\text{PolyLog}\left (2,-\frac{g \left (d x^{-n}+e\right )}{d f-e g}\right )+\text{PolyLog}\left (2,\frac{d x^{-n}}{e}+1\right )+\frac{f x^n \log \left (d x^{-n}+e\right )}{f x^n+g}-\frac{d f \log \left (d x^{-n}+e\right )}{d f-e g}+\frac{d f \log \left (f+g x^{-n}\right )}{d f-e g}-\log \left (d x^{-n}+e\right ) \log \left (\frac{d \left (f+g x^{-n}\right )}{d f-e g}\right )+\log \left (-\frac{d x^{-n}}{e}\right ) \log \left (d x^{-n}+e\right )\right )}{f^2 n} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[Log[c*(d + e*x^n)^p]/(x*(f + g/x^n)^2),x]

[Out]

(g*p*Log[f - f/x^n] + f*p*x^n*Log[f - f/x^n] - g*n*p*Log[x]*Log[f - f/x^n] - f*n*p*x^n*Log[x]*Log[f - f/x^n] -
 p*Log[e + d/x^n]*(-(f*x^n) + (g + f*x^n)*Log[f - f/x^n]) - f*x^n*Log[c*(d + e*x^n)^p] + g*Log[f - f/x^n]*Log[
c*(d + e*x^n)^p] + f*x^n*Log[f - f/x^n]*Log[c*(d + e*x^n)^p] + g*n*p*Log[x]*Log[1 + (f*x^n)/g] + f*n*p*x^n*Log
[x]*Log[1 + (f*x^n)/g] + p*(g + f*x^n)*PolyLog[2, -((f*x^n)/g)])/(f^2*n*(g + f*x^n)) - (p*(-((d*f*Log[e + d/x^
n])/(d*f - e*g)) + (f*x^n*Log[e + d/x^n])/(g + f*x^n) + Log[-(d/(e*x^n))]*Log[e + d/x^n] + (d*f*Log[f + g/x^n]
)/(d*f - e*g) - Log[e + d/x^n]*Log[(d*(f + g/x^n))/(d*f - e*g)] - PolyLog[2, -((g*(e + d/x^n))/(d*f - e*g))] +
 PolyLog[2, 1 + d/(e*x^n)]))/(f^2*n)

________________________________________________________________________________________

Maple [C]  time = 1.22, size = 589, normalized size = 3.8 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(c*(d+e*x^n)^p)/x/(f+g/(x^n))^2,x)

[Out]

1/n*ln((d+e*x^n)^p)/f^2*ln(g+f*x^n)+1/n*ln((d+e*x^n)^p)*g/f^2/(g+f*x^n)-1/n*p/f^2*dilog(((g+f*x^n)*e+d*f-e*g)/
(d*f-e*g))-1/n*p/f^2*ln(g+f*x^n)*ln(((g+f*x^n)*e+d*f-e*g)/(d*f-e*g))-e*g*p*ln(g+f*x^n)/f^2/(d*f-e*g)/n+1/n*p*e
/f^2*g/(d*f-e*g)*ln((g+f*x^n)*e+d*f-e*g)-1/2*I/n*Pi*csgn(I*(d+e*x^n)^p)*csgn(I*c*(d+e*x^n)^p)*csgn(I*c)*g/f^2/
(g+f*x^n)-1/2*I/n*Pi*csgn(I*(d+e*x^n)^p)*csgn(I*c*(d+e*x^n)^p)*csgn(I*c)/f^2*ln(g+f*x^n)+1/2*I/n*Pi*csgn(I*(d+
e*x^n)^p)*csgn(I*c*(d+e*x^n)^p)^2*g/f^2/(g+f*x^n)-1/2*I/n*Pi*csgn(I*c*(d+e*x^n)^p)^3/f^2*ln(g+f*x^n)-1/2*I/n*P
i*csgn(I*c*(d+e*x^n)^p)^3*g/f^2/(g+f*x^n)+1/2*I/n*Pi*csgn(I*(d+e*x^n)^p)*csgn(I*c*(d+e*x^n)^p)^2/f^2*ln(g+f*x^
n)+1/2*I/n*Pi*csgn(I*c*(d+e*x^n)^p)^2*csgn(I*c)/f^2*ln(g+f*x^n)+1/2*I/n*Pi*csgn(I*c*(d+e*x^n)^p)^2*csgn(I*c)*g
/f^2/(g+f*x^n)+1/n*ln(c)/f^2*ln(g+f*x^n)+1/n*ln(c)*g/f^2/(g+f*x^n)

________________________________________________________________________________________

Maxima [A]  time = 1.45836, size = 282, normalized size = 1.81 \begin{align*} e n p{\left (\frac{d \log \left (\frac{e x^{n} + d}{e}\right )}{d e f^{2} n^{2} - e^{2} f g n^{2}} - \frac{g \log \left (\frac{f x^{n} + g}{f}\right )}{d f^{3} n^{2} - e f^{2} g n^{2}} - \frac{\log \left (f x^{n} + g\right ) \log \left (\frac{e f x^{n} + e g}{d f - e g} + 1\right ) +{\rm Li}_2\left (-\frac{e f x^{n} + e g}{d f - e g}\right )}{e f^{2} n^{2}}\right )} -{\left (\frac{1}{f^{2} n + \frac{f g n}{x^{n}}} - \frac{\log \left (f + \frac{g}{x^{n}}\right )}{f^{2} n} + \frac{\log \left (\frac{1}{x^{n}}\right )}{f^{2} n}\right )} \log \left ({\left (e x^{n} + d\right )}^{p} c\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(d+e*x^n)^p)/x/(f+g/(x^n))^2,x, algorithm="maxima")

[Out]

e*n*p*(d*log((e*x^n + d)/e)/(d*e*f^2*n^2 - e^2*f*g*n^2) - g*log((f*x^n + g)/f)/(d*f^3*n^2 - e*f^2*g*n^2) - (lo
g(f*x^n + g)*log((e*f*x^n + e*g)/(d*f - e*g) + 1) + dilog(-(e*f*x^n + e*g)/(d*f - e*g)))/(e*f^2*n^2)) - (1/(f^
2*n + f*g*n/x^n) - log(f + g/x^n)/(f^2*n) + log(1/(x^n))/(f^2*n))*log((e*x^n + d)^p*c)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{\log \left ({\left (e x^{n} + d\right )}^{p} c\right )}{f^{2} x + \frac{2 \, f g x x^{n}}{x^{2 \, n}} + \frac{g^{2} x}{x^{2 \, n}}}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(d+e*x^n)^p)/x/(f+g/(x^n))^2,x, algorithm="fricas")

[Out]

integral(log((e*x^n + d)^p*c)/(f^2*x + 2*f*g*x*x^n/x^(2*n) + g^2*x/x^(2*n)), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(c*(d+e*x**n)**p)/x/(f+g/(x**n))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\log \left ({\left (e x^{n} + d\right )}^{p} c\right )}{{\left (f + \frac{g}{x^{n}}\right )}^{2} x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(d+e*x^n)^p)/x/(f+g/(x^n))^2,x, algorithm="giac")

[Out]

integrate(log((e*x^n + d)^p*c)/((f + g/x^n)^2*x), x)